#!/bin/sh

if [ -n "$1" ]
then
	echo "sh get params $1"
	dhcp_res=$(ps -e | grep -a "udhcpc")
	echo $dhcp_res
	dev_res=${dhcp_res% $1*}
	echo $dev_res
	extra_res=${dev_res% root*}
	echo $extra_res
	pid_res=${extra_res##* }
	echo $pid_res
	kill -9 $pid_res
	if [ $? -eq 0 ]
	then
		echo "sh net $1 dhcp stop success"
	else
		"sh net $1 dhcp stop failed"
		exit 1
	fi
else
    echo "sh get null params"
	exit 1
fi
